﻿using System;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
using Microsoft.WowAddonStudio.FrameXml.Components.Events;
using Microsoft.WowAddonStudio.FrameXml.Components.Support;
using Microsoft.WowAddonStudio.FrameXml.Serialization;
using Microsoft.WowAddonStudio.FrameXml.Serialization.LayoutFrames;

namespace Microsoft.WowAddonStudio.FrameXml.Components
{
	[ToolboxBitmap(typeof (ListView), "ListView.bmp")]
	[ToolboxItemFilter("WowAddonStudio", ToolboxItemFilterType.Require)]
    [EventGroup(EventGroup.Minimap, EventName.OnLoad)]
	public class MinimapControl : FrameControl
	{
		/// <summary>
		/// Initializes a new instance of the <see cref="MinimapControl"/> class.
		/// </summary>
		public MinimapControl()
		{
		}

		/// <summary>
		/// Initializes a new instance of the <see cref="MinimapControl"/> class.
		/// </summary>
		/// <param name="minimap">The minimap.</param>
		public MinimapControl(Minimap minimap)
			: base(minimap)
		{
		}


		/// <summary>
		/// Gets the model.
		/// </summary>
		public Minimap Minimap
		{
			get { return this.SerializationObject as Minimap; }
		}

		/// <summary>
		/// Gets the type of the serialization object this control manages.
		/// </summary>
		public override Type SerializationObjectType
		{
			get
			{
				return typeof(Minimap);
			}
		}

        /// <summary>
        /// Gets the default size of a FrameXML control.
        /// </summary>
        /// <value></value>
        protected override Size DefaultSize
        {
            get { return new Size(135, 135); }
        }
	}
}